/**
 * 验证组件关联字段类型的限制。
 * @param elementType
 * @param field
 * @returns {boolean}
 */
import relateFieldTypes from './relateFieldTypes';

export default function validateRelateField(elementType, field) {
    return (field && relateFieldTypes[elementType] && relateFieldTypes[elementType].indexOf(field.get('type')) !== -1);
}
